<template>
  <div class="content-right__warp">
    <div class="float__warp">
      <home-float title="热门文章">
        <float-note v-for="item in hot" :key="item.noteId" :value="item" />
      </home-float>
    </div>
    <div class="float__warp">
      <home-float title="猜你喜欢">
        <float-note v-for="item in likeData" :key="item.noteId" :value="item" />
      </home-float>
    </div>
    <!-- <div class="float__warp">
      <home-float title="友情链接" />
    </div> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      hot: [],
      likeData: [],
    };
  },
  mounted() {
    this.getHotData();
    this.getlikeData();
  },
  methods: {
    async getHotData() {
      let data = await this.$axios.get("/api/get/hot/note", {
        params: {
          pageSize: 5,
          pageNo: 0,
        },
      });
      this.hot = data.data.result;
    },
    async getlikeData() {
      let data = await this.$axios.get("/api/get/note/rand/list");
      this.likeData = data.data.result;
    },
  },
};
</script>

<style lang="scss" scoped>
.float__warp {
  margin-bottom: 50px;
}
</style>